// 引入Service和请求头ServiceName
import { Service, ServiceName } from '@/network/http.js'
import store from '@/store/index.js' // 引入store

const api = {
  /**
   * 主列表
   */
  getData(params) {
    return Service.get(
      `/${ServiceName}/api/external/TYardHandoverListController/queryall`, { params }
    )
  },
  /**
   * 保存
   */
  updateData(params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}/api/external/TYardHandoverListController/insert`, params
    )
  },
  /**
   * 根据Id查询
   */
  getDataById(params) {
    return Service.get(
      `/${ServiceName}/api/external/TYardHandoverListController/queryId`,{params}
    )
  },
  /**
   * 撤销
   */
  deleteData(params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}/api/external/TYardHandoverListController/delete`,params
    )
  },
}
export default api